<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./jquery-3.6.0.js"></script>
    <link rel="stylesheet" href="./bootstrap.css">
    <title>Document</title>
    <style>
         body{
            background-image: url(./20.jpg);
            background-position-x: -200px;
        }
        .caption {
            white-space: nowrap;

            overflow: hidden;

            text-overflow: ellipsis;
        }

        /* body{
            background-image: url(./bj40150419.gif);
        } */
        .container {
            margin-top: 100px;
        }
    </style>
</head>

<body>
    <ol class="breadcrumb">
        <li><a href="#">收藏页</a></li>

    </ol>
    <div class="container">

    </div>

    <script>

        $.ajax({
            type: 'post',
            url: 'https://api.it120.cc/conner/shop/goods/fav/list/v2',
            data: {
                token: localStorage.getItem('token'),
                type: 0
            }



        }).then(res => {
            console.log(res.data)
            var str = ''
            res.data.result.forEach(i => {
                str += `
                <div class="col-sm-6 col-md-4 col-lg-3">
                        <div class="thumbnail">
                        <img class='s-img' style="width: 200px; height: 200px; "
                            src="${i.pic}"alt="">
                        <div class="caption">
                            &emsp;<a>${i.goodsName}</a>
                            <a>${i.dateAdd}</a>
                        
                      
                        
                    
                </div>
               
                </div>
                
            </div>
                
                `

            });
            document.querySelector('.container').innerHTML = str

        })
    </script>
</body>

</html>